<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="cfn" uri="http://com.abou/cfn"%>
<%@page import="com.abou.constant.product.*"%>
<%@page import="com.abou.mvc.controller.admin.HomeController"%>
<%@ include file="../../constants.jsp"%>
<%@ include file="../vars.jsp"%>

<%-- Last consulted products list. Parameters are :
    - name : the product name
    - price : the product price
    - description : the product description
    - colors : the product colors
    - makeup : the product makeup
--%>

<div class="breaker"></div>

<%-- The last consulted products --%>
<div id="last-consulted">
	<c:choose>
		<c:when test="${not empty lastConsultedProducts}">

			<span class="title"><spring:theme code="last.consulted.products"/>&nbsp;</span>
			<br>

			<c:forEach items="${lastConsultedProducts}" var="lastProduct">
				<div class="lastproduct">
					<a href="<c:url value="/${lastProduct.link}"/>">
			       		<img src="${cfn:format(pageContext, lastProduct.imagePath)}"
			       			alt="" title="" height="100px" width="125px" />
			       	</a><br>
			       	<a href="<c:url value="/${lastProduct.link}"/>" class="action">
			       		<span class="name">${lastProduct.name}</span>
			       		<br>
			       		<span class="price-small">${lastProduct.price} &euro;</span>
					</a>
				</div>
			</c:forEach>

		</c:when>
		<c:otherwise>
			<spring:theme code="last.consulted.products.empty"/>
		</c:otherwise>
	</c:choose>
</div>